<?php 

?>
<div class="sp_moi">
			<div class="title_spmoi">Sản phẩm mới</div>
			<!--sidebar -->
			<div class="sanpham_moi">
				<ul id="mycarousel" class="jcarousel-skin-tango">
				<?php 
						$sanphammoi = db_query_post_in_posttype_2meta_key_nopaged(10, 'post', 'date', 'DESC', $wpdb->prefix.'display', 'display', $wpdb->prefix.'hot-product', 'display');
						$moi = new WP_Query($sanphammoi);
						if($moi->have_posts())
						{
							while ($moi->have_posts())
							{
								$moi->the_post();
								$post_id = get_the_ID();
								$title = get_the_title($post_id);
								$alt = db_get_alt_attachment_id($post_id, $wpdb->prefix.'thumbnail');
								if(!$alt)
									$alt = db_vietnamese_slug($title);
								$thumbnail = db_get_post_meta($post_id, $wpdb->prefix.'thumbnail');	
								?>
								<li><a href="<?php the_permalink();?>" title="<?php echo $title;?>">
									
									<?php echo db_get_thumbnail($thumbnail,$alt,195,140);?>
								<span><?php echo db_shortDesc($title, 20);?></span></a></li>
								<?php 
							}
						}
						?>			
					
				  </ul>
			</div>
    <!-- END slider -->
		</div>